Many applications involving the processing of digital signals require the frequent determination of sine and cosine values for given angles. These values can be determined either through calculation or by looking the values up in a lookup table in which sine and cosine values have previously been stored. Alternatively, some conventional systems determine sine and cosine values by looking up a first value and then calculating the desired value through series expansion. Each of the conventional methods of determining sine and cosine values have drawbacks in that they require multiple steps or clock cycles to complete, or in that they require too many memory locations. A need, therefore, exists for a sine/cosine lookup table that is compact and can be read in one clock cycle.
FIG. 2 shows an example of a conventional sine/cosine lookup table. Here, table 105 includes a plurality of memory locations, such as, locations 107 and 109. The left column 111, including memory location 107, contains a plurality of sine values. The right column 113, including location 109, contains a plurality of cosine values. Memory locations 107 and 109 comprise a row of lookup table 105. Conventionally, the rows of lookup table 105 cover a range from 0 degrees to 180 degrees. During a lookup operation, the address of the row corresponding to the desired angle is determined, and the corresponding sine value is read from column 111, and the corresponding cosine value is read from column 113. A disadvantage of the conventional table shown in FIG. 2 is that the lookup table requires the use of a significant number of memory locations.
A system can employ an alternative to the conventional lookup table shown in FIG. 2 and use roughly half as many memory locations. Such a system has a lookup table containing sine values from 0 to 180 degrees, such as that shown in column 111. The savings in the number of memory locations can be realized by eliminating a corresponding array of cosine values, such as that contained in column 113. When a cosine value is desired for a given angle, the system first determines the value of a complementary angle, the sine of which equals the cosine of the given angle. Then, to look up the cosine value for the given angle, the system simply looks up the sine of the complementary angle. For example, if the sine and cosine of 30 degrees are desired, the system will first read the sine value from the memory location corresponding to the 30 degrees, and the system will then determine that the value for the cosine of 30 degrees should be read from the memory location corresponding to the sine of 60 degrees. Thus, in comparison to the conventional lookup table of FIG. 2, the system employing the alternative conventional lookup table saves on the number of memory locations at the expense of additional logic and computations.